package com.woniuxy.gobang84.util;

import java.util.ArrayList;

import com.woniuxy.gobang84.entity.Piece;
import com.woniuxy.gobang84.ui.NetGameStage;

import javafx.scene.paint.Color;

public class Global {
	public final  static String URL="jdbc:mysql:///wn_chess?serverTimezone=UTC";
	// 游戏窗口宽
	public static final int GAME_WINDOW_WIDTH = 850;
	// 游戏窗口高
	public static final int GAME_WINDOW_HEIGHT = 660;
	// 棋盘格子数
	public static final int GAME_CHECKERBOARD_CELL_NUM = 14;
	// 棋盘格子尺寸
	public static final int GAME_CHECKERBOARD_CELL_SIZE = 40;
	// 棋盘线条长度
	public static final int GAME_CHECKERBOARD_LINE_LEN = GAME_CHECKERBOARD_CELL_NUM * GAME_CHECKERBOARD_CELL_SIZE;
	// 存储棋盘边距
	public static final int GAME_CHECKERBOARD_MARGIN_SIZE = 50;
	// 存储棋子半径
	public static final int GAME_PIECE_RADIUS = 15;
	// 棋子先手颜色
	public static final Color GAME_PIECE_FIRST = Color.BLACK;
	// 棋子后手颜色
	public static final Color GAME_PIECE_NEXT = Color.WHITE;
	// 存储下一个棋子状态
	public static boolean GAME_PIECE_STATE_FIRST = true;
	// 存储落子信息
	// public static Piece[] PIECES=new
	// Piece[(GAME_CHECKERBOARD_CELL_NUM+1)*(GAME_CHECKERBOARD_CELL_NUM+1)];
	public static ArrayList<Piece> PIECES = new ArrayList<Piece>();
	// 存储棋谱信息
	public static ArrayList<Piece> CVS_PIECES = null;
	// 棋谱棋子索引
	public static int CVS_INDEX = 0;
	// 存储游戏是否结束
	public static boolean GAME_OVER = false;

	// 按钮宽
	public static final int BTN_WIDTH = 120;
	// 按钮高
	public static final int BTN_HEIGHT = 60;
	// 按钮字号
	public static final int BTN_TEXT_SIZE = 20;
	// 按钮字体
	public static final String BTN_TEXT_TYPE = "楷体";

	// 新局按钮x值
	public static final int NEW_BTN_X = 700;
	// 新局按钮y值
	public static final int NEW_BTN_Y = 200;
	// 悔棋按钮X值
	public static final double REGRET_BTN_X = 700;
	// 悔棋按钮y值
	public static final int REGRET_BTN_Y = 300;

	// 保存棋谱按钮X值
	public static final double SAVE_BTN_X = 700;
	// 保存棋谱按钮y值
	public static final int SAVE_BTN_Y = 400;
	// 打谱按钮X值
	public static final double REPRODUCE_BTN_X = 700;
	// 打谱按钮y值
	public static final int REPRODUCE_BTN_Y = 500;
	// 保存打谱上一步按钮X值
	public static final double REPRODUCE_PREV_BTN_X = 680;
	// 保存打谱上一步按钮Y值
	public static final double REPRODUCE_PREV_BTN_Y = 570;
	// 保存打谱下一步按钮X值
	public static final double REPRODUCE_NEXT_BTN_X = 720;
	// 保存打谱下一步按钮Y值
	public static final double REPRODUCE_NEXT_BTN_Y = 570;
	// 保存打谱退出按钮X值
	public static final double REPRODUCE_EXIT_BTN_X = 760;
	// 保存打谱退出按钮Y值
	public static final double REPRODUCE_EXIT_BTN_Y = 570;

	public static String myIp;
	public static int myPort;
	public static String oppoIp;
	public static int oppoPort;
	public static NetGameStage netGameStage;
	
	public static String myAccount="tom";

}
